﻿using System;
using Microsoft.DirectX;


namespace BakalarskaPraca.Generation.Other
{
    public class SunTrail
    {
        private readonly int _iterations;

        public SunTrail(int iterations)
        {
            this._iterations = iterations;
        } 

        public Vector3 GetLightDirection(int iteration)
        {
            float t = (float) (((double)iteration / this._iterations) * Math.PI);
            float x = 0.65f;
            float y = (float)(Math.Cos(t));
            float z = (float)(Math.Sin(t));

            return new Vector3(-x, -y / 1.5f, -z / 1.5f);
        }
    }
}
